﻿/**

 * Copyright (c) 2015-2016, FastDev 刘强 (fastdev@163.com) & Quincy.

 *

 * Licensed under the Apache License, Version 2.0 (the "License");

 * you may not use this file except in compliance with the License.

 * You may obtain a copy of the License at

 *

 *      http://www.apache.org/licenses/LICENSE-2.0

 *

 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an "AS IS" BASIS,

 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

 * See the License for the specific language governing permissions and

 * limitations under the License.

 */

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Data.Common;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Net;
using System.Reflection;
using System.Resources;
using System.Runtime;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Principal;
using System.Text;
using System.Threading;
using System.Web;
using System.Web.Caching;
using System.Web.Compilation;
using System.Web.Configuration;
using System.Web.Hosting;
using System.Web.Management;
using System.Web.Security;
using System.Web.UI;
using System.Web.Util;
using System.Xml;
using Microsoft.Win32;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Concurrent;
using System.Data.SqlClient;
using System.Text.RegularExpressions;
using OF.DB.DataAccess;
using Newtonsoft.Json;
using OF.DB.Test.DataAccess;

namespace OF.DB.Test
{
    public class Program
    {
        public static void TestGenerate()
        {
            DBHelper.DefaultEntityNameSpace = "OF.DB.Test.Entity";
            BlogGenerator.GetEntityDefine();
            BlogGenerator.GenerateSql();
        }
        

        public static void Main(string[] args)
        {
            TestGenerate();
            //TestRunGenerateClass.TestRun();
            //TestQueryGenerateClass.Test();
        }

        public static string GetJsonString(object obj)
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(obj, Newtonsoft.Json.Formatting.None, new Newtonsoft.Json.JsonSerializerSettings
            {
                NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore,
                DateTimeZoneHandling = DateTimeZoneHandling.Local
            });
        }
    }
}
